package com.h819.core.file.excel.poi;

import org.apache.commons.lang.StringUtils;

import java.util.Comparator;

/**
 * @Title: ComparatorSet.java
 * @Description: TODO(为过滤  excel 的重复行，实现的比较器，用于 set。仅用于 POIBase.java)
 * @author H819
 * @date 2011-1-11
 * @version V1.0
 */
public class ComparatorSet implements Comparator<String> {

	// 返回值意义

	// a negative integer, zero, or a positive integer as the first argument is
	// less than, equal to, or greater than the second.

	public int compare(String a, String b) {

		a = StringUtils.substringAfter(a, POIBase.spliteValueTag);
		b = StringUtils.substringAfter(b, POIBase.spliteValueTag);
		return a.compareTo(b);

	}

}